package main

import "fmt"

func main() {

	//logrus.f("失败")

	//f := float64(-23.1)
	//i := int64(-24)
	//i2 := int64(24)
	//fmt.Printf("%d \n", uint8(f))
	//fmt.Printf("%d \n", uint8(i))
	//fmt.Printf("%d \n", uint8(i2))
	//toInt64 := binarys.BytesToInt64([]byte{uint8(i)}, "1234")
	//fmt.Println(binarys.PrintBinaryString([]byte{uint8(i)}))
	//fmt.Printf("ttt %d", toInt64)

	//binary.BigEndian.PutUint16()

	var a = (1 / 0.5) * 1
	fmt.Printf("%v", a)

}

//
//import (
//	"context"
//	"fmt"
//	"github.com/sirupsen/logrus"
//	"go-iot-gateway/server"
//	iec104_apdu "go-iot-gateway/server/protocol/iec104/apdu"
//	iec104_client "go-iot-gateway/server/protocol/iec104/client"
//	"os/signal"
//	"syscall"
//	"time"
//)
//
//var (
//	VERSION     string
//	BUILD_TIME  string
//	GO_VERSION  string
//	GIT_VERSION string
//)
//
//func main() {
//	clientOptions := iec104_client.NewClientOptions()
//	clientOptions.Address = "10.0.5.133:2404"
//	clientOptions.Logger = logrus.New()
//	clientOptions.Logger.SetLevel(logrus.DebugLevel)
//	clientOptions.Logger.SetFormatter(&logrus.TextFormatter{})
//	clientOptions.OnConnectionLost = onConnectionLost
//	clientOptions.OnConnect = onConnect
//	clientOptions.OnMessageHandler = onMessageHandler
//
//	client := iec104_client.NewClient(clientOptions)
//
//	client.Connect()
//
//	ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
//	defer stop()
//	// Listen for the interrupt signal.
//	<-ctx.Done()
//	// Restore default behavior on the interrupt signal and notify user of shutdown.
//	stop()
//
//	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
//	defer cancel()
//	if err := server.Shutdown(ctx); err != nil {
//		logrus.Fatal("Server forced to shutdown: ", err)
//	}
//
//	// 等待中断信号以优雅地关闭服务器（设置 5 秒的超时时间）
//	//quit := make(chan os.Signal)
//	//signal.Notify(quit, os.Interrupt)
//	//<-quit
//
//	logrus.Println("系统退出")
//}
//
//func onMessageHandler(apdu *iec104_apdu.APDU) {
//	logrus.Info("---onMessageHandler")
//	fmt.Printf("%v", apdu)
//}
//
//func onConnect() {
//	logrus.Info("---onConnect")
//	//总召唤
//	//client.SendTotalCall()
//}
//
//func onConnectionLost() {
//	logrus.Info("---onConnectionLost")
//}
